home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_12_02 / plauger / xmsg.h < prev    next >
C/C++ Source or Header  |  1993-12-05  |  662b  |  26 lines

  1. Listing 1 -- class xmsg
  2.  
  3. class xmsg {
  4. public:
  5.     typedef void(*raise_handler)(xmsg&);
  6. private:
  7.     const char *what, *where, *why;    // exposition 
  8. only
  9.     int alloced;                    // exposition only
  10.     static raise_handler handler;    // exposition only
  11. protected:
  12.     virtual void do_raise();
  13.     xmsg(const char *what_arg, const char *where_arg,
  14. const char *why_arg, int copyfl);
  15. public:
  16.     xmsg(const char *what_arg = 0, const char *where_arg 
  17. = 0,
  18.         const char *why_arg = 0);
  19.     virtual ~xmsg();
  20.     void raise();
  21.     const char *what() const;
  22.     const char *where() const;
  23.     const char *why() const;
  24.     static raise_handler set_raise_handler(raise_handler handler_arg);
  25.     };
  26.